import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {PeerSearchComponent} from './peer-search/peer-search.component';
import {PeerSetComponent} from './peer-set/peer-set.component';
import {RouterModule, Routes} from '@angular/router';
import {NbCardModule, NbListModule, NbStepperModule, NbToastrModule, NbUserModule} from '@nebular/theme';
import {PeerAddComponent} from './peer-add/peer-add.component';
import {StatusCardComponent} from './status-card/status-card.component';
import {FormsModule} from '@angular/forms';

const appRoutes: Routes = [
  {
    path: 'set',
    component: PeerSetComponent,
  },
  {
    path: 'search',
    component: PeerSearchComponent,
  }
];

@NgModule({
  declarations: [PeerSearchComponent, PeerSetComponent, PeerAddComponent, StatusCardComponent],
  imports: [
    CommonModule,
    RouterModule.forChild(
      appRoutes,
    ),
    NbUserModule,
    NbCardModule,
    NbListModule,
    NbStepperModule,
    NbToastrModule,
    FormsModule
  ],
  exports: [PeerSearchComponent, PeerSetComponent, PeerAddComponent, StatusCardComponent]
})
export class SharedModule {
}
